import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  name: [{ required: true, message: "角色名称为必填项", trigger: "blur" }],
  auth_pages: [{ required: true, message: "路由权限为必填项", trigger: "blur" }],
  auth_element: [{ required: true, message: "元素权限为必填项", trigger: "blur" }],
  is_caller: [{ required: true, message: "是否参与群呼为必选项", trigger: ["blur", "change"] }],
  is_super: [{ required: true, message: "是否超管账号为必选项", trigger: ["blur", "change"] }],
});
